package router

import (
	"github.com/gin-gonic/gin"
	jwt "github.com/golangblogs/gojwt"
	"study-plan/api/middleware"
)

func LoadApp(r *gin.Engine) {
	r.Use(middleware.Logger())
	user := r.Group("/user")
	{

		user.POST("/register", UserRegister)
		user.POST("/login", UserLogin)
		user.Use(jwt.JWTAuth("qq"))
		user.POST("/cat/list", CarList)
		user.POST("/cat/create", CarCreate)
		user.POST("/cat/del/course", CarDelCourse)
		user.POST("/order/create", OrderCreate)
	}
}
